﻿using mvcForum.Core.Interfaces.Data;
using System;
using System.Linq.Expressions;


namespace mvcForum.Core.Specifications {

	public static class BoardSpecifications {

		public class ById : ISpecification<Board> {
			private Int32 id;

			public ById(Int32 id) {
				this.id = id;
			}

			public Expression<Func<Board, Boolean>> IsSatisfied {
				get {
					return b => b.Id == this.id;
				}
			}
		}

		public class Enabled : ISpecification<Board> {

			public Enabled() {}

			public Expression<Func<Board, Boolean>> IsSatisfied {
				get {
					return b => b.Disabled == false;
				}
			}
		}
	}
}